package m.jclecai.com.adapter.holder;

import android.content.Context;
import android.support.annotation.LayoutRes;
import android.widget.ImageView;
import android.widget.TextView;

import java.util.List;

import butterknife.BindView;
import m.jclecai.com.R;
import m.jclecai.com.bean.LotteryGroupBean;

/**
 * Created by ZD on 2017/5/4.
 */

public class BjdcGroupHolder extends ViewHolder {

    @BindView(R.id.list_item_parent_title)
    TextView list_item_parent_title;
    @BindView(R.id.list_item_parent_icon)
    ImageView list_item_parent_icon;
    @BindView(R.id.tv_dg)
    TextView tv_dg;

    public BjdcGroupHolder(Context context, @LayoutRes int resource) {
        super(context, resource);
    }

    public void init(List<LotteryGroupBean> jclqGroup, int groupPosition, int count, boolean isExpanded,int pager){
        LotteryGroupBean bean = jclqGroup.get(groupPosition);
        String title = bean.getTitle();
        list_item_parent_title.setText(title +"  "+ count+"场可投");
        if(isExpanded){
            list_item_parent_icon.setImageResource(R.drawable.cz);
        }else {
            list_item_parent_icon.setImageResource(R.drawable.d0);
        }
    }

}
